package ooad.nextgen.domain;

public class SalesLineItem {
	private int quantity;
	private ProductDescription description;

	public SalesLineItem(ProductDescription desc, int quantity) {
		this.description = desc;
		this.quantity = quantity;
	}
	public Money getSubTotal() {
            Money subtotal  = new Money();
            subtotal = description.getPrice().times(quantity);
            return subtotal;

	}
	public String toString(){
		return  description.getItemId().getId()+"    "+description.getDescription()+"    "+description.getPrice().getAmount()+"    "+this.quantity;
	}

}
